import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// element-ui
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

// global css
import '@/styles/index.scss'

// 字云
import 'echarts-wordcloud/dist/echarts-wordcloud.min'

// 全局组件通信
import emitter from 'tiny-emitter/instance'

// 权限
import './permission'

const app = createApp(App)

// 组件通信
app.config.globalProperties.$emitter = emitter

app
  .use(store)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .use(router)
  .mount('#app')
